<template>
  <view class="container">
    <!-- 顶部导航栏 -->
    <view class="nav-bar">
      <text class="title">就近加油</text>
    </view>

    <!-- 加油站主图 -->
    <view class="station-header">
      <image 
        class="station-image" 
        src="/static/logo.png" 
        mode="aspectFill"
      />
      <view class="brand-tag">
        <image class="brand-logo" src="/static/logo.png" />
      </view>
    </view>

    <!-- 加油站信息 -->
    <view class="station-info">
      <view class="info-header">
        <text class="station-name">中途石油加油站</text>
        <view class="operation-time">
          <uni-icons type="time" size="16" color="#666" />
          <text>营业时间：周一至周五 09:00-22:00</text>
        </view>
      </view>

      <view class="address-info">
        <uni-icons type="location" size="16" color="#666" />
        <text>山阳区人民中路32号</text>
      </view>
    </view>

    <!-- 油价详情 -->
    <view class="price-section">
      <text class="section-title">油价详情</text>
      <view class="price-list">
        <view 
          v-for="(item, index) in oilPrices"
          :key="index"
          class="price-item"
        >
          <view class="oil-type">
            <text class="type-name">{{ item.type }}</text>
            <text class="price">{{ item.price }}元/L</text>
          </view>
          <view class="divider" v-if="index < oilPrices.length - 1" />
        </view>
      </view>
    </view>
  </view>
</template>

<script setup>
import { ref } from 'vue'

// 油价数据
const oilPrices = ref([
  { type: '92#', price: 5.85 },
  { type: '95#', price: 5.85 },
  { type: '98#', price: 5.85 },
  { type: '0#', price: 5.85 }
])
</script>

<style lang="scss" scoped>
$primary-red: #e54d42;
$text-dark: #333;
$text-gray: #666;

.container {
  background: #f5f5f5;
  min-height: 100vh;
}

.nav-bar {
  height: 88rpx;
  background: $primary-red;
  display: flex;
  align-items: center;
  padding: 0 32rpx;
  
  .title {
    color: #fff;
    font-size: 36rpx;
    font-weight: 600;
  }
}

.station-header {
  position: relative;
  height: 400rpx;
  
  .station-image {
    width: 100%;
    height: 100%;
  }
  
  .brand-tag {
    position: absolute;
    top: 20rpx;
    left: 20rpx;
    background: rgba(255,255,255,0.9);
    padding: 8rpx 16rpx;
    border-radius: 8rpx;
    
    .brand-logo {
      width: 160rpx;
      height: 60rpx;
    }
  }
}

.station-info {
  background: #fff;
  padding: 32rpx;
  margin: 24rpx;
  border-radius: 16rpx;
  
  .station-name {
    font-size: 40rpx;
    font-weight: 700;
    color: $text-dark;
    margin-bottom: 24rpx;
    display: block;
  }
  
  .operation-time,
  .address-info {
    display: flex;
    align-items: center;
    font-size: 28rpx;
    color: $text-gray;
    margin-bottom: 16rpx;
    
    uni-icons {
      margin-right: 8rpx;
    }
  }
}

.price-section {
  background: #fff;
  margin: 24rpx;
  border-radius: 16rpx;
  padding: 32rpx;
  
  .section-title {
    font-size: 34rpx;
    font-weight: 600;
    color: $text-dark;
    display: block;
    margin-bottom: 32rpx;
  }
  
  .price-list {
    background: #f9f9f9;
    border-radius: 12rpx;
    
    .price-item {
      padding: 28rpx 32rpx;
      
      .oil-type {
        display: flex;
        justify-content: space-between;
        align-items: center;
        
        .type-name {
          font-size: 32rpx;
          color: $text-dark;
        }
        
        .price {
          font-size: 34rpx;
          color: $primary-red;
          font-weight: 600;
        }
      }
      
      .divider {
        height: 1rpx;
        background: #eee;
        margin: 0 16rpx;
      }
    }
  }
}
</style>